#define _CRT_SECURE_NO_WARNINGS	

#include<stdio.h>

int main()
{
    int n;
    scanf("%d", &n);
    switch (n)
    {
    case 1:
    case 6:
        printf("Monday\n");
        break;
    case 2:
    case 7:
        printf("Tuesday\n");
        break;
    case 3:
    case 8:
        printf("Wednesday\n");
        break;
    case 4:
    case 9:
        printf("Thursday\n");
        break;
    default:
        printf("Friday\n");
    }
    return 0;
}